package com.ndp.fb.enums.feed;

import java.util.ArrayList;
import java.util.List;

/**
 * The age group that the product is targeted towards.
 * Accepted values are newborn, infant, toddler, kids, and adult.
 * Created by hunk.qin on 2016/4/20.
 */
public enum AgeGroup {

    newborn("newborn"), infant("infant"), toddler("toddler"), kids("kids"),adult("adult");

    private  String value;
    AgeGroup(String value){
        this.value=value;
    }

    public static List<String> getValues(){
        ArrayList<String> list=new ArrayList<>();
        for (AgeGroup ageGroup : AgeGroup.values()) {
            list.add(ageGroup.value);
        }
        return list;
    }

    public static boolean contain(String value){
        for (AgeGroup ageGroup : AgeGroup.values()) {
            if (ageGroup.value.equals(value)) {
                return true;
            }
        }
        return false;
    }
}
